<%@ page language="java" import="com.alibaba.fastjson.JSONObject" pageEncoding="UTF-8" %>
<%@ page import="weaver.conn.RecordSet" %>
<%@ page import="weaver.general.BaseBean" %>
<%@ page import="weaver.general.Util" %>
<%--获取资金计划提报审批流程每月可以发起一次--%>
<%
    BaseBean baseBean = new BaseBean();
    String sqrq = Util.null2String(request.getParameter("sqrq"));
    String bm = Util.null2String(request.getParameter("bm"));
    String formid = Util.null2String(request.getParameter("formid"));
    baseBean.writeLog(">>>>>getZjjhtbsplcCounts_Ajax>>>>>sqrq="+sqrq);
    baseBean.writeLog(">>>>>getZjjhtbsplcCounts_Ajax>>>>>bm="+bm);
    baseBean.writeLog(">>>>>getZjjhtbsplcCounts_Ajax>>>>>formid="+formid);
    JSONObject dataJson = new JSONObject();
    String status ="success";
    try {
        RecordSet rs = new RecordSet();
        rs.executeQuery("select count(requestid) from formtable_main_"+formid+" where bm=? and substring(sqrq,0,7)=? and xmglsrmcf !=0",bm,sqrq);
        rs.next();
        int counts = Util.getIntValue(rs.getString(1));
        dataJson.put("counts", counts);
    } catch (Exception e) {
        status = "exception";
        e.printStackTrace();
    }
    dataJson.put("status", status);
    baseBean.writeLog(">>>>>getZjjhtbsplcCounts_Ajax>>>>>dataJson="+dataJson);
    out.print(JSONObject.toJSONString(dataJson));
%>



